const CommentHead = (props) => {
  return (
    <h3 className="comm-head">
      热门评论<sub>({props.comments.length})</sub>
      <span
        className={props.active === "default" ? "active" : ""}
        onClick={() => props.setActive("default")}
      >
        默认
      </span>
      <span
        className={props.active === "time" ? "active" : ""}
        onClick={() => props.setActive("time")}
      >
        时间
      </span>
    </h3>
  );
};

export default CommentHead;
